<{include file ="header.tpl"}>
<{include file ="navibar.tpl"}>
<{include file ="sidebar.tpl"}>
<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->
<{$osadmin_action_alert}>
<{$osadmin_quick_note}>

<div class="well">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#home" data-toggle="tab">產品列表</a></li>
    </ul>

    <div id="myTabContent" class="tab-content">
        <div class="tab-pane active in" id="home">

            <form id="tab" method="post" action="">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>產品ID</th>
                        <th>產品名稱</th>
                        <th>原價</th>
                        <th>預購價</th>
                        <th>產品描述</th>
                        <th>是否展示</th>
                        <th>操作</th>
                        <th>是否上下架</th>
                    </tr>
                    </thead>
                    <tbody>
                    <{foreach name=product from=$products item=product}>
                        <tr>
                            <td><{$product.products_id}></td>
                            <td><{$product.products_name}></td>
                            <td><{$product.products_price}></td>
                            <td><{$product.products_special_price}></td>
                            <td><{$product.products_desc}></td>
                            <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                                <{if $product.products_index > 0 }>
                            <img width=30 height=auto src="<{$smarty.const.ADMIN_URL}>/assets/images/gou.png"/>
                                <{else}>
                            <img width=30 height=auto src="<{$smarty.const.ADMIN_URL}>/assets/images/cha.png"/>
                                <{/if}>
                            </td>
                            <td>
                                <a class="btn btn-info"
                                   href="products_modify.php?id=<{$product.products_id}>&action=modify"
                                   target="_self" title="修改"
                                   alt="修改">修改</a>

                                <a class="btn btn-info"
                                   href="products.php?id=<{$product.products_id}>&action=del"
                                   onclick="if(confirm('确定删除吗?')==false)return false;"
                                   target="_self" title="删除"
                                   alt="删除">删除</a>

                            </td>
                            <{if $product.products_index > 0 }>
                            <td style="color:red;font-size: 14px;font-weight: normal;">
                                <a class="btn btn-info"
                                   href="products.php?id=<{$product.products_id}>&action=down"
                                   target="_self" title="下架"
                                   alt="下架"><span style="color: yellow;">下架</span></a></td>
                            </td>
                            <{else}>
                            <td style="color:blue;font-size: 14px;font-weight: normal;">
                                <a class="btn btn-info"
                                   href="products.php?id=<{$product.products_id}>&action=up"
                                   target="_self" title="上架"
                                   alt="上架"><span style="color: blue;">上架</span></a></td>
                            </td>
                            <{/if}>
                        </tr>
                        <{/foreach}>
                    </tbody>
                </table>
            </form>
        </div>
    </div>

    <!---操作的确认层，相当于javascript:confirm函数--->
    <{$osadmin_action_confirm}>


    <!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
    <{include file="footer.tpl" }>